﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="main.aspx.cs" Inherits="TCMSystem.main" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>首页</title>
    <link href="res/css/main.css" rel="stylesheet" text="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" AutoSizePanelID="regionPanel" HideScrollbar="true"
        runat="server" />
    <ext:RegionPanel ID="regionPanel" ShowBorder="false" runat="server">
        <Regions>
            <ext:Region ID="regionTop" Height="60px" ShowBorder="false" ShowHeader="false" Position="Top"
                Layout="Fit" runat="server">
                <Toolbars>
                    <ext:Toolbar ID="Toolbar1" Position="Bottom" runat="server">
                        <Items>
                            <ext:ToolbarText ID="txtUser" runat="server">
                            </ext:ToolbarText>
                            <ext:ToolbarSeparator runat="server" />
                            <ext:ToolbarText ID="txtOnlineUserCount" runat="server">
                            </ext:ToolbarText>
                            <ext:ToolbarSeparator runat="server" />
                            <ext:ToolbarText ID="txtCurrentTime" runat="server">
                            </ext:ToolbarText>
                            <ext:ToolbarFill runat="server" />
                            <ext:Button ID="btnShowHideHeader" runat="server" Icon="BulletArrowUp" ToolTip="隐藏标题栏"
                                EnablePostBack="false">
                            </ext:Button>
                            <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server" />
                            <ext:Button ID="btnRefresh" runat="server" Icon="Reload" ToolTip="刷新主区域内容" EnablePostBack="false">
                            </ext:Button>
                            <ext:ToolbarSeparator runat="server" />
                            <ext:Button ID="btnHelp" EnablePostBack="false" Icon="Help" Text="帮助" runat="server">
                            </ext:Button>
                            <ext:ToolbarSeparator runat="server" />
                            <ext:Button ID="btnExit" runat="server" Icon="UserRed" Text="安全退出" ConfirmText="确定退出系统？"
                                OnClick="btnExit_Click">
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </Toolbars>
                <Items>
                    <ext:ContentPanel ShowBorder="false" ShowHeader="false" BodyStyle="background-color:#1C3E7E;"
                        ID="ContentPanel1" runat="server">
                        <div style="font-size: 20px; color:White; font-weight:bold; padding: 5px 10px; ">
                            <a href="./main.aspx" style="color:White;text-decoration:none;"><%= TCMSystem.TblMstConfigHelper.Title %></a>
                        </div>
                    </ext:ContentPanel>
                </Items>
            </ext:Region>
            <ext:Region ID="regionLeft" Split="true" EnableSplitTip="true" CollapseMode="Default"
                Icon="Outline" EnableCollapse="true" EnableLargeHeader="false" Width="200px"
                ShowHeader="true" Title="系统菜单" Layout="Fit" Position="Left" runat="server">
                <Items>
                    <ext:Tree runat="server" EnableArrows="true" ShowBorder="false" ShowHeader="false"
                        AutoScroll="true" ID="treeMenu">
                    </ext:Tree>
                </Items>
            </ext:Region>
            <ext:Region ID="mainRegion" ShowHeader="false" Layout="Fit" Margins="0 0 0 0" Position="Center"
                runat="server">
                <Items>
                    <ext:TabStrip ID="mainTabStrip" EnableTabCloseMenu="true" ShowBorder="false" runat="server">
                        <Tabs>
                            <ext:Tab ID="Tab1" Title="首页" EnableIFrame="true" IFrameUrl="~/admin/default.aspx"
                                Icon="House" runat="server">
                            </ext:Tab>
                        </Tabs>
                    </ext:TabStrip>
                </Items>
            </ext:Region>
        </Regions>
    </ext:RegionPanel>
    <ext:Window ID="Window1" runat="server" IsModal="true" Hidden="true" EnableIFrame="true"
        EnableResize="true" EnableMaximize="true" IFrameUrl="about:blank" Width="650px"
        Height="450px">
    </ext:Window>
    </form>
    <script type="text/javascript">

        var DATA = {
            'treeMenu': '<%= treeMenu.ClientID %>',
            'regionPanel': '<%= regionPanel.ClientID %>',
            'regionTop': '<%= regionTop.ClientID %>',
            'btnShowHideHeader': '<%= btnShowHideHeader.ClientID %>',
            'mainTabStrip': '<%= mainTabStrip.ClientID %>',
            'txtUser': '<%= txtUser.ClientID %>',
            'txtOnlineUserCount': '<%= txtOnlineUserCount.ClientID %>',
            'txtCurrentTime': '<%= txtCurrentTime.ClientID %>',
            'btnRefresh': '<%= btnRefresh.ClientID %>',
            'userName': '<%= User.Identity.Name %>',
            'userIP': '<%= Request.UserHostAddress %>',
            'onlineUserCount': <%= GetOnlineCount() %>
        };

    </script>
    <script src="res/js/main.js" type="text/javascript"></script>
</body>
</html>
